// 用来管理所有的请求接口

import service from "./request";

// 登录接口和数

export const Login = (data)=>{
    return service({
        method:'post',
        url:'/login',
        data
    })
}

export const GetMenus = ()=>{
    return service({
        method:'get',
        url:'/menus',
    })
}
// 获取用户列表
export const GetUsers = (params)=>{
    return service({
        method:'get',
        url:'/users',
        params
    })
}
// 添加用户
export const AddUsers = (data)=>{
    return service({
        method:'post',
        url:'/users',
        data
    })
}
// 获取用户列表
export const GetOenUsers = (params)=>{
    return service({
        method:'get',
        url:'/users/'+params,
    })
}
// 修改用户
export const EditUsers = (data)=>{
    return service({
        method:'put',
        url:'/users/'+data.id,
        data
    })
}

// 删除用户
export const DelOenUsers = (params)=>{
    return service({
        method:'delete',
        url:'/users/'+params,
    })
}